package com.fuhan.common.exception;

import com.fuhan.common.restful.ResponseEnum;

/**
 * @Author: Chao
 * @description:
 * @Date: 2021/1/26 20:40
 */
public class UserActionException extends RuntimeException{
    private ResponseEnum exceptionType;

    /**
     * 默认构造，系统异常
     */
    public UserActionException() {
        this("用户操作异常。", ResponseEnum.SYSTEM_ERROR);
    }

    /**
     * 带参数构造
     *
     * @param message       异常信息
     * @param exceptionType 异常类型
     */
    public UserActionException(String message, ResponseEnum exceptionType) {
        super(message);
        this.exceptionType = exceptionType;
    }

    public ResponseEnum getExceptionType() {
        return exceptionType;
    }
}
